<!-- addEditRights.html 2017-08-08 14:12:27-->
<div class="ibox">
	<div class="ibox-title">
		<h5>权限编辑</h5>
		<div class="pull-right">
			#if(authRights.id) <a href="javascript:" style="font-size:12px;color:#666" onclick="add(#(authRights.id))">新增子权限</a>  
			<a href="javascript:" style="font-size:12px;color:#666" onclick="add(#(authRights.parent_id))">新增同级权限</a>  #end
   		<a href="javascript:" style="font-size:12px;color:#666" onclick="closeEdit()">关闭</a>
    </div>
	</div>
	<div class="ibox-content">
		<form id="form" class="form-horizontal required-validate" method="post" action="saveRights" novalidate="novalidate" onsubmit="return validateCallback(this,thisAjaxDone)">
			<input type="hidden" name="authRights.id" value="#(authRights.id)"/>
			<input type="hidden" name="authRights.parent_id" value="#(authRights.parent_id)"/>
			
			<div class="form-group">
		   	<label class="col-xs-2 control-label">上级权限：</label>
		     <div class="col-xs-10" style="line-height: 35px">
		     #if(parentRights)#(parentRights.name)#else无#end
		     </div>
		  </div>
			#if(authRights.parent_id)
				<input type="hidden" name="authRights.portal" value="#(authRights.portal)"/>
				<input type="hidden" name="authRights.area" value="#(authRights.area)"/>
			#else
				<div class="form-group">
			   	<label class="col-xs-2 control-label">所属平台：</label>
			     <div class="col-xs-4" style="line-height: 35px">
			     	<select name="authRights.portal" class="form-control required">
			     		#(data("AUTH_PORTAL","option",authRights.portal))
			     	</select>
			     </div>
					<label class="col-xs-2 control-label">区域：</label>
					<div class="col-xs-4">
						<input type="text" class="form-control required" name="authRights.area" value="#(authRights.area??"MAIN")"/>
					</div>
			  </div>
			#end
			<div class="form-group">
		   	<label class="col-xs-2 control-label">是否默认：</label>
		     <div class="col-xs-4">
						#for(item:data("SHIFOU"))
						<label style="font-weight:normal;line-height: 37px;margin-bottom: 0px;padding-right: 5px"><input class="required" type="radio" name="authRights.is_default" #if(authRights.is_default)#if(authRights.is_default==item.key)checked="checked"#end#elseif(item.key=="F")checked="checked"#end value="#(item.key)"/> #(item.value.name) </label>
						#end
		     </div>
				<label class="col-xs-2 control-label">图标样式：</label>
				<div class="col-xs-4">
	<input type="text" class="form-control " name="authRights.icon" value="#(authRights.icon)"/>
				</div>
			</div>			<div class="form-group">
				<label class="col-xs-2 control-label">权限：</label>
				<div class="col-xs-4">
	<input type="text" class="form-control required" name="authRights.rights" value="#(authRights.rights)"/>
				</div>
				<label class="col-xs-2 control-label">名称：</label>
				<div class="col-xs-4">
	<input type="text" class="form-control required" name="authRights.name" value="#(authRights.name)"/>
				</div>
			</div>						
			<div class="form-group">
				<label class="col-xs-2 control-label">链接：</label>
				<div class="col-xs-10">
	<input type="text" class="form-control " name="authRights.url" value="#(authRights.url)"/>
				</div>
			</div>				<div class="form-group">
				<label class="col-xs-2 control-label">排序：</label>
				<div class="col-xs-4">
		<input type="text" class="form-control digits required" name="authRights.sort" value="#(authRights.sort??"100")"/>
				</div>
					<label class="col-xs-2 control-label">状态：</label>
				<div class="col-xs-4">
		#for(item:data("ENABLE_FLAG"))
		<label style="font-weight:normal;line-height: 37px;margin-bottom: 0px;padding-right: 5px"><input class="required" type="radio" name="authRights.enable_flag" #if(authRights.enable_flag)#if(authRights.enable_flag==item.key)checked="checked"#end#elseif(item.key=="T")checked="checked"#end value="#(item.key)"/> #(item.value.name) </label>
		#end
				</div>
			</div>			
					  <div class="form-group">
		   	<div class="col-xs-9 col-xs-offset-2">
		     	<button type="submit" class="btn btn-primary">保存</button>
		     	#if(authRights.id)
		     		  <a class="btn btn-danger" href="deleteRights?id=#(authRights.id)" target="ajaxTodo" title="确定删除吗？" callback="deleteAjaxTodo">删除</a>
		     	#end
		    </div>
		  </div>
		</form>
 	</div>
</div>